<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body>
    <style>
      div {
        height: 3000px;
        background-color: red;
      }
      div#box {
        height: 100px;
        background-color: black;
      }
      div#box:target {
        background-color: royalblue;
      }
    </style>
    <a href="#box">锚点</a>
    <div></div>
    <div id="box"></div>
  </body>
</html>
